function prefixToPostfix(var s : string) : string; // whitespaces should be removed

var
        a, b : string;

        function isOp(ch : char) : boolean;
        begin
                result := (ch = '+') or (ch = '-');
        end;

begin
        result := s[1];
        delete(s, 1, 1);
        if isOp(result[1]) then begin
                a := get(s);
                b := get(s);
                result := a + b + result;
        end;
end;